export default {
  state: {
    mainColor: null,
    logo: null,
    menu: [],
    name: null,
    subColor: null,
    entryUrl: "",
    isMiniProgram: false,
    isFullscreen: 0,
    service_tel: 0,
    dynamic_related_good: null,
    vip_rule: -1,
    index_advertising: '',
    vip_rigths: '',
    integral_rule: {},
    shop_set: {}
  },
  mutations: {
    dynamicInit(state, value) {
      state.dynamic_related_good = null;
    },
    setRelatedGood(state, value) {
      state.dynamic_related_good = value;
    },
    setAppInfo(state, value) {
        state.mainColor = value.theme_color;
        state.logo = value.logo;
        state.menu = value.memu;
        state.name = value.name;
        state.subColor = value.assistant_theme_color;
        state.service_tel = value.service_tel;
        state.vip_rule = value.vip_rule
        state.index_advertising = value.index_advertising
        state.vip_rigths = value.advert_img.vip_rigths
        state.integral_rule = value.integral_rule
        state.shop_set = value.shop_set
      
    },
    setEntryUrl(state, value) {
      state.entryUrl = value;
    },
    setMiniProgram(state, value) {
      state.isMiniProgram = value;
    },
    setFullscreen(state, value) {
      state.isFullscreen = value;
    }
  },
  actions: {}
};
